#pragma once
#include "..\gears\cdiobject.h"
#include <d3dx9.h>

class CdiCamera : public CdiObject
{
private:
  static BOOL Running;
  bool Setup();

protected:
  D3DXVECTOR3 m_position;
  D3DXVECTOR3 m_lookAt;
  D3DXVECTOR3 m_up;
  float m_scale;

public:
  CdiCamera();
  ~CdiCamera(void);
  CdiCamera(D3DXVECTOR3& position, D3DXVECTOR3& lookAt, D3DXVECTOR3& up);

public:
  // Methods
  /////////////////////////////////

  // This will set the camera's position  
  void SetCameraPosition(D3DXVECTOR3& position);

  // Set the cameras up vector
  void SetCameraUp(D3DXVECTOR3& Up);

  // Set the camera's look at position
  void SetCameraLookAt(D3DXVECTOR3& LookAt);
  
  // Get the current Camera Position
  D3DXVECTOR3& GetPosition(void);
  
  // Get the Camera's up position
  D3DXVECTOR3& GetCameraUp(void);

  // Get the camera's look at position
  D3DXVECTOR3& GetLookAt(void);

  // Sets the scale of the movement
  void SetScale(float scale);

  inline float GetScale() const { return m_scale; }

public:

  // Override to handle the input
  virtual void HandleInput(UINT Msg, WPARAM wParam, LPARAM lParam) = 0;
};
